<!DOCTYPE html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon32.ico?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon16.ico?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="ubuntu,problems,">










<meta name="description" content="稀里糊涂报了一个大创项目需要openface，只能再回去熟悉ubuntu，以前的指令还有git都忘得干干净净。大腿都做好了框架，demo都能跑了。虽然不太清楚我还能做什么，但是可能有用到就去学吧，作为宝贵的项目经历和学习机会。 本打算跑个框架自带的demo，结果搞openface环境遇到各种问题（部分为历史遗留），先记下吧。">
<meta name="keywords" content="ubuntu,problems">
<meta property="og:type" content="article">
<meta property="og:title" content="ubuntu16.04.3中配置openface环境遇到的问题">
<meta property="og:url" content="http://htelepathh.gitee.io/2018/03/07/ubuntu16.04.3中配置openface环境遇到的问题/index.html">
<meta property="og:site_name" content="OUTPUT">
<meta property="og:description" content="稀里糊涂报了一个大创项目需要openface，只能再回去熟悉ubuntu，以前的指令还有git都忘得干干净净。大腿都做好了框架，demo都能跑了。虽然不太清楚我还能做什么，但是可能有用到就去学吧，作为宝贵的项目经历和学习机会。 本打算跑个框架自带的demo，结果搞openface环境遇到各种问题（部分为历史遗留），先记下吧。">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2018-10-07T14:15:03.771Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="ubuntu16.04.3中配置openface环境遇到的问题">
<meta name="twitter:description" content="稀里糊涂报了一个大创项目需要openface，只能再回去熟悉ubuntu，以前的指令还有git都忘得干干净净。大腿都做好了框架，demo都能跑了。虽然不太清楚我还能做什么，但是可能有用到就去学吧，作为宝贵的项目经历和学习机会。 本打算跑个框架自带的demo，结果搞openface环境遇到各种问题（部分为历史遗留），先记下吧。">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":true},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://htelepathh.gitee.io/2018/03/07/ubuntu16.04.3中配置openface环境遇到的问题/">





  <title>ubuntu16.04.3中配置openface环境遇到的问题 | OUTPUT</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">OUTPUT</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">HTelepathH's blog</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-message">
          <a href="/message" rel="section">
            
            留言
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about" rel="section">
            
            关于
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://htelepathh.gitee.io/2018/03/07/ubuntu16.04.3中配置openface环境遇到的问题/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="HTelepathH">
      <meta itemprop="description" content>
      <meta itemprop="image" content="/images/MOB.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="OUTPUT">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">ubuntu16.04.3中配置openface环境遇到的问题</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-03-07T20:05:11+08:00">
                2018-03-07
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/fundamental/" itemprop="url" rel="index">
                    <span itemprop="name">fundamental</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>稀里糊涂报了一个大创项目需要openface，只能再回去熟悉ubuntu，以前的指令还有git都忘得干干净净。大腿都做好了框架，demo都能跑了。虽然不太清楚我还能做什么，但是可能有用到就去学吧，作为宝贵的项目经历和学习机会。</p>
<p>本打算跑个框架自带的demo，结果搞openface环境遇到各种问题（部分为<strong>历史遗留</strong>），先记下吧。<br><a id="more"></a></p>
<h3 id="问题1：E：could-not-get-lock-var-lib-dpkg-lock-open"><a href="#问题1：E：could-not-get-lock-var-lib-dpkg-lock-open" class="headerlink" title="问题1：E：could not get lock /var/lib/dpkg/lock -open"></a>问题1：E：could not get lock /var/lib/dpkg/lock -open</h3><p>用apt-get命令安装一些软件包时，总报错：E：could not get lock /var/lib/dpkg/lock -open</p>
<p>输入命令<br><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">sudo rm /var/lib/dpkg/lock</span><br><span class="line">sudo dpkg --configure -a     强制重新配置软件包</span><br><span class="line">sudo rm /var/lib/apt/lists/lock</span><br><span class="line">sudo rm /var/cache/apt/archives/lock</span><br><span class="line">sudo apt update</span><br></pre></td></tr></table></figure></p>
<h3 id="问题2：apt-get时大量依赖包错误-dpkg-warning"><a href="#问题2：apt-get时大量依赖包错误-dpkg-warning" class="headerlink" title="问题2：apt-get时大量依赖包错误 dpkg warning"></a>问题2：apt-get时大量依赖包错误 dpkg warning</h3><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">sudo mv /var/lib/dpkg/info /var/lib/dpkg/info.bak 现将info文件夹更名  </span><br><span class="line">sudo mkdir /var/lib/dpkg/info 再新建一个新的info文件夹  </span><br><span class="line">sudo apt-get update</span><br><span class="line">apt-get -f install  </span><br><span class="line">sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info.bak 执行完上一步操作后会在新的info文件夹下生成一些文件，现将这些文件全部移到info.bak文件夹下  </span><br><span class="line">sudo rm -rf /var/lib/dpkg/info 把自己新建的info文件夹删掉  </span><br><span class="line">sudo mv /var/lib/dpkg/info.bak /var/lib/dpkg/info 把以前的info文件夹重新改回名字</span><br></pre></td></tr></table></figure>
<p>dpkg: warning: files list file “<em>**</em>“for package missing</p>
<p>运行脚本<br><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">chmod +x recover.sh</span><br><span class="line">sudo ./recover</span><br></pre></td></tr></table></figure></p>
<p>recover.sh    //是谷歌上找到的，水平不够自己还写不了啊<br><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">#!/bin/bash</span><br><span class="line">set -e</span><br><span class="line"></span><br><span class="line"># Clean out /var/cache/apt/archives</span><br><span class="line">apt-get clean</span><br><span class="line"># Fill it with all the .debs we need</span><br><span class="line">apt-get --reinstall -dy install $(dpkg --get-selections | grep &apos;[[:space:]]install&apos; | cut -f1)</span><br><span class="line"></span><br><span class="line">DIR=$(mktemp -d -t info-XXXXXX)</span><br><span class="line">for deb in /var/cache/apt/archives/*.deb</span><br><span class="line">do</span><br><span class="line">    # Move to working directory</span><br><span class="line">    cd &quot;$DIR&quot;</span><br><span class="line">    # Create DEBIAN directory</span><br><span class="line">    mkdir -p DEBIAN</span><br><span class="line">    # Extract control files</span><br><span class="line">    dpkg-deb -e &quot;$deb&quot;</span><br><span class="line">    # Extract file list, fixing up the leading ./ and turning / into /.</span><br><span class="line">    dpkg-deb -c &quot;$deb&quot; | awk &apos;&#123;print $NF&#125;&apos; | cut -c2- | sed -e &apos;s/^\/$/\/./&apos; &gt; DEBIAN/list</span><br><span class="line">    # Figure out binary package name</span><br><span class="line">    DEB=$(basename &quot;$deb&quot; | cut -d_ -f1)</span><br><span class="line">    # Copy each control file into place</span><br><span class="line">    cd DEBIAN</span><br><span class="line">    for file in *</span><br><span class="line">    do</span><br><span class="line">        cp -a &quot;$file&quot; /var/lib/dpkg/info/&quot;$DEB&quot;.&quot;$file&quot;</span><br><span class="line">    done</span><br><span class="line">    # Clean up</span><br><span class="line">    cd ..</span><br><span class="line">    rm -rf DEBIAN</span><br><span class="line">done</span><br><span class="line">rmdir &quot;$DIR&quot;</span><br></pre></td></tr></table></figure></p>
<h3 id="问题3：python3和python2默认切换"><a href="#问题3：python3和python2默认切换" class="headerlink" title="问题3：python3和python2默认切换"></a>问题3：python3和python2默认切换</h3><p>设置python3为默认<br><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100</span><br><span class="line">sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150</span><br></pre></td></tr></table></figure></p>
<p>需要python2时输入：<br><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">sudo update-alternatives --config python</span><br></pre></td></tr></table></figure></p>
<h3 id="问题4-环境配置完后重启出现The-system-is-running-in-low-graphics-mode"><a href="#问题4-环境配置完后重启出现The-system-is-running-in-low-graphics-mode" class="headerlink" title="问题4: 环境配置完后重启出现The system is running in low-graphics mode"></a>问题4: 环境配置完后重启出现The system is running in low-graphics mode</h3><p>按Ctrl +Atl+F1，切换到命令界面<br><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">sudo apt-get purge nvidia-current</span><br><span class="line">sudo apt-add-repository ppa:xorg-edgers/ppa</span><br><span class="line">sudo apt-get update</span><br><span class="line">sudo apt-get install nvidia-current nvidia-settings</span><br></pre></td></tr></table></figure></p>
<p>有许多问题没有解决，虚拟机重装两次，断断续续花了三天总算配置完了openface，只记下了一些常见问题，可以开始真正的学习了。</p>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/ubuntu/" rel="tag"># ubuntu</a>
          
            <a href="/tags/problems/" rel="tag"># problems</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2018/02/19/输出/" rel="next" title="输出">
                <i class="fa fa-chevron-left"></i> 输出
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2018/03/10/git的基本使用/" rel="prev" title="git的基本使用">
                git的基本使用 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
      <div id="sidebar-dimmer"></div>
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="/images/MOB.jpg" alt="HTelepathH">
            
              <p class="site-author-name" itemprop="name">HTelepathH</p>
              <p class="site-description motion-element" itemprop="description">Learning by doing.</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives">
              
                  <span class="site-state-item-count">25</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">12</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">15</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="99088577@qq.com" target="_blank" title="Mail">
                      Mail</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://gitee.com/htelepathh" target="_blank" title="Gitee">
                      Gitee</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/htlpt" target="_blank" title="GitHub">
                      GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://weibo.com/u/6207125886" target="_blank" title="微博">
                      微博</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://www.zhihu.com/people/huang-he-tu" target="_blank" title="知乎">
                      知乎</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#问题1：E：could-not-get-lock-var-lib-dpkg-lock-open"><span class="nav-number">1.</span> <span class="nav-text">问题1：E：could not get lock /var/lib/dpkg/lock -open</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#问题2：apt-get时大量依赖包错误-dpkg-warning"><span class="nav-number">2.</span> <span class="nav-text">问题2：apt-get时大量依赖包错误 dpkg warning</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#问题3：python3和python2默认切换"><span class="nav-number">3.</span> <span class="nav-text">问题3：python3和python2默认切换</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#问题4-环境配置完后重启出现The-system-is-running-in-low-graphics-mode"><span class="nav-number">4.</span> <span class="nav-text">问题4: 环境配置完后重启出现The system is running in low-graphics mode</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-angle-double-left"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">HTelepathH</span>

  
</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  
  


  

  

</body>
</html>
